package com.gooapple.notepad.ui;


import com.gooapple.notepad.R;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;

public class ViewBookActivity extends Activity {
	private Button  up;
	private Button  down;
	private TextView  title;
	private LinearLayout linearLayout;
    /** Called when the activity is first created. */
 private MyView mv;
 @Override
 public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  mv = new MyView(this);
  setContentView(R.layout.bookinfo);
  linearLayout=(LinearLayout) findViewById(R.id.linear);
  up=(Button) findViewById(R.id.previous);
  down=(Button) findViewById(R.id.next);
  title=(TextView) findViewById(R.id.title);
  linearLayout.addView(mv);
  onclick();
 }

 public void  onclick(){
	 up.setOnClickListener(new OnClickListener() {
		
		public void onClick(View v) {
			// TODO Auto-generated method stub
			mv.onUp();
		}
	});
	 down.setOnClickListener(new OnClickListener() {
		
		public void onClick(View v) {
			// TODO Auto-generated method stub
			mv.onDown();
		}
	});
 }

}
